<style type="text/css">
    .layui-form-select dl{z-index:9999;}
</style>
<form class="layui-form" action="{:url()}" method="post" id="editForm">
    <div class="layui-form-item">
        <label class="layui-form-label">进货数量</label>
        <div class="layui-input-inline w200">
            <input type="text" class="layui-input field-in_num" name="in_num" lay-verify="required" autocomplete="off" placeholder="请填写进货数量">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">进货单位</label>
        <div class="layui-input-inline w200">
            <input type="text" class="layui-input field-in_unit" name="in_unit" autocomplete="off" placeholder="请填写进货单位">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" name="pid" value="{$pid}">
            <button type="submit" class="layui-btn layui-btn-normal" hisi-data="{pop: true, refresh: true}" lay-submit="" lay-filter="formSubmit">提交</button>
            <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
        </div>
    </div>

</form>
<table id="dataTable"></table>
{include file="system@block/layui" /}

<script>
var s = "";

layui.use(['table'], function() {
    var table = layui.table;
    table.render({
        elem: '#dataTable'
        ,url: '{:url("getList")}?id={$pid}' //数据接口
        ,page: false //开启分页
        ,skin: 'row'
        ,even: true
        ,limit: 20
        ,text: {
            none : '暂无相关数据'
        }
        ,toolbar: '#toolbar'
        ,defaultToolbar: ['filter']
        ,cols: [[ //表头
            {field: 'id', title: 'ID', width: 50}
            ,{field: 'in_num', title: '进货量'}
            ,{field: 'in_unit', title: '单位'}
            ,{field: 'ctime', title: '时间'}
        ]]
        ,done: function(){
            if (typeof(layui.global.addTableTool) !== 'undefined') {
                layui.global.addTableTool();
            }
        }
    });
});

layui.use(['form', 'layedit'], function () {
    var form=layui.form,layedit=layui.layedit;
    var index1 = layedit.build('LAY_demo1', {
            tool: ['strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right'],
            height: 200
        });
});

</script>